#ifndef XCOMBO_BOX_H
#define XCOMBO_BOX_H

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

#include <XWidget.h>

struct XComboBoxData
{
	XTextPack* Text;
	void* Data;
};

class XEXPORT_DLL XComboBox : public XWidget
{
private:
	int Active;
	bool Expanded;
	std::vector<XComboBoxData*> Data;

	void _loadVertices();
	void _loadTextureVertices();
public:
	XComboBox(XHash hash, XWindow* parent);

	void SetDisable();

	void SetGeometry(XRectangle rect);
	void SetExpanded(bool expanded);
	void AddData(const char* text, void* data);
	void* GetActiveData();
	void* GetData(int nr);

	void Update(XInputModule* input);
};

#endif